package com.lei.library_mvp_retrofit.http.factroy;

import com.lei.library_mvp_retrofit.http.product.NetWorkManger;

/**
 * @ProjectName : YoHoJava_002
 * @Author : 雷金泷
 * @Time : 2021/1/8 16:16
 * @Description : 文件描述
 */
public class BaseRetrofitFactroy implements IRetrofitFactroy {
    private static BaseRetrofitFactroy instance = new BaseRetrofitFactroy();
    private NetWorkManger netWorkManger = new NetWorkManger();

    @Override
    public NetWorkManger createRetrofit() {
        return netWorkManger;
    }

    public static <T> T create(Class<T> service){
        return instance.createRetrofit().getRetrofit().create(service);
    }
}
